package writeHandle

import (
	"fmt"
	"github.com/gorilla/websocket"
)

func WriteErr(conn *websocket.Conn, msgErr error) {
	msg := &response{
		Code:    400,
		Content: msgErr.Error(),
	}
	
	err := conn.WriteJSON(msg)
	if err != nil {
		fmt.Println("writeErr:", err)
		return
	}
}
